package com.project.mapper;

import com.project.bean.ManBean;
import org.apache.ibatis.annotations.*;

import java.time.LocalDate;
import java.util.List;

public interface IManMapper {
    @Insert("insert into t_man(m_name,m_birthday)values(#{name},#{birthday})")
    void add(ManBean man);
    @Delete("delete from t_man where pk_manID = #{id}")
    void del(int id);
    @Update("update from t_man set m_birthday = #{birthday} where pk_manID = #{id}")
    void update(@Param("id") int id,@Param("birthday") LocalDate birthday);
    @Select("select * from t_man ")
    @ResultMap("manMap")
    List<ManBean> findAll();

}
